<!DOCTYPE html>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="style.css">
<title>Captive</title>
<script type="text/javascript" src="jquery-1.9.1.min.js"></script>


<script>

	var init = 5;
	
	$(document).ready(
		function() {
			document.getElementById("dialog").style.display="inherit";
			document.getElementById("background").style.display="inherit";
			document.getElementById("dialog").innerHTML = "(The policeman and I arrive at Ferst Harbor)";
			$("#dialog").click(dialog0);
		}
	);
	
	function dialog0()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says: <br/>DAD!! HELP ME!!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog1);
		}
	}
	
	function dialog1()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/police.png";
		document.getElementById("dialog").innerHTML = "Policeman says: <br/>Let go of the child.";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog2);
		}
	}
	
	function dialog2()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/stephen.png";
		document.getElementById("dialog").innerHTML = "Stephen says: <br/>(Point the gun at Jimmy) Don't shoot, or the child will die with me!!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog3);
		}
	}
	
	function dialog3()
	{
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/><div onclick=\"dialog3_1()\">1. The kidnapper looks familiar...</div><div onclick=\"dialog5()\">2. If you let Jimmy go, I will give you the money!</div><div onclick=\"dialog6()\">3. Jimmy, don't worry. I will save you.</div>";
		$("#dialog").unbind('click');
	}
	
	
	
	function dialog3_1()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/stephen.png";
		document.getElementById("dialog").innerHTML = "Stephen says: <br/>You're damn right I look familiar!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog4);
		}
	}
	
	function dialog4()
	{
		window.location = "scene3-1.php";
	}
	
	function dialog5()
	{
		window.location = "scene3-2.php";
	}
	
	function dialog6()
	{
		window.location = "scene3-3.php";
	}
	
</script>



</head>

<body>


<div id="container">
	<div id="background"><img src="images/harbor.jpg" /></div>
	<div id="dialog">
	</div>
	<div id="people"><img id="peopleimage" src=""></div>
</div>




</body>
</html>